home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / rpm / rpmfi.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-10-22  |  16.7 KB  |  646 lines

  1. #ifndef H_RPMFI
  2. #define H_RPMFI
  3.  
  4. /** \ingroup rpmdep rpmtrans
  5.  * \file lib/rpmfi.h
  6.  * Structure(s) used for file info tag sets.
  7.  */
  8.  
  9. /*@-exportlocal@*/
  10. /*@unchecked@*/
  11. extern int _rpmfi_debug;
  12. /*@=exportlocal@*/
  13.  
  14. #if defined(_RPMFI_INTERNAL)
  15. /**
  16.  */
  17. typedef struct sharedFileInfo_s *        sharedFileInfo;
  18.  
  19. /**
  20.  */
  21. struct sharedFileInfo_s {
  22.     int pkgFileNum;
  23.     int otherFileNum;
  24.     int otherPkg;
  25.     int isRemoved;
  26. };
  27.  
  28. /**
  29.  * A package filename set.
  30.  */
  31. struct rpmfi_s {
  32.     int i;            /*!< Current file index. */
  33.     int j;            /*!< Current directory index. */
  34.  
  35. /*@observer@*/
  36.     const char * Type;        /*!< Tag name. */
  37.  
  38.     rpmTag tagN;        /*!< Header tag. */
  39. /*@refcounted@*/ /*@null@*/
  40.     Header h;            /*!< Header for file info set (or NULL) */
  41.  
  42. /*@only@*/ /*?null?*/
  43.     const char ** bnl;        /*!< Base name(s) (from header) */
  44. /*@only@*/ /*?null?*/
  45.     const char ** dnl;        /*!< Directory name(s) (from header) */
  46.  
  47. /*@only@*/ /*@relnull@*/
  48.     const char ** fmd5s;    /*!< File MD5 sum(s) (from header) */
  49. /*@only@*/ /*@relnull@*/
  50.     const char ** flinks;    /*!< File link(s) (from header) */
  51. /*@only@*/ /*@null@*/
  52.     const char ** flangs;    /*!< File lang(s) (from header) */
  53.  
  54. /*@only@*/ /*@relnull@*/
  55.           uint_32 * dil;    /*!< Directory indice(s) (from header) */
  56. /*@only@*/ /*?null?*/
  57.     const uint_32 * fflags;    /*!< File flag(s) (from header) */
  58. /*@only@*/ /*?null?*/
  59.     const uint_32 * fsizes;    /*!< File size(s) (from header) */
  60. /*@only@*/ /*?null?*/
  61.     const uint_32 * fmtimes;    /*!< File modification time(s) (from header) */
  62. /*@only@*/ /*?null?*/
  63.           uint_16 * fmodes;    /*!< File mode(s) (from header) */
  64. /*@only@*/ /*?null?*/
  65.     const uint_16 * frdevs;    /*!< File rdev(s) (from header) */
  66. /*@only@*/ /*?null?*/
  67.     const uint_32 * finodes;    /*!< File inodes(s) (from header) */
  68.  
  69. /*@only@*/ /*@null@*/
  70.     const char ** fuser;    /*!< File owner(s) (from header) */
  71. /*@only@*/ /*@null@*/
  72.     const char ** fgroup;    /*!< File group(s) (from header) */
  73.  
  74. /*@only@*/ /*@null@*/
  75.     char * fstates;        /*!< File state(s) (from header) */
  76.  
  77. /*@only@*/ /*@null@*/
  78.     const uint_32 * fcolors;    /*!< File color bits (header) */
  79.  
  80. /*@only@*/ /*@null@*/
  81.     const char ** fcontexts;    /*! FIle security contexts. */
  82.  
  83. /*@only@*/ /*@null@*/
  84.     const char ** cdict;    /*!< File class dictionary (header) */
  85.     int_32 ncdict;        /*!< No. of class entries. */
  86. /*@only@*/ /*@null@*/
  87.     const uint_32 * fcdictx;    /*!< File class dictionary index (header) */
  88.  
  89. /*@only@*/ /*@null@*/
  90.     const uint_32 * ddict;    /*!< File depends dictionary (header) */
  91.     int_32 nddict;        /*!< No. of depends entries. */
  92. /*@only@*/ /*@null@*/
  93.     const uint_32 * fddictx;    /*!< File depends dictionary start (header) */
  94. /*@only@*/ /*@null@*/
  95.     const uint_32 * fddictn;    /*!< File depends dictionary count (header) */
  96.  
  97. /*@only@*/ /*?null?*/
  98.     const uint_32 * vflags;    /*!< File verify flag(s) (from header) */
  99.  
  100.     int_32 dc;            /*!< No. of directories. */
  101.     int_32 fc;            /*!< No. of files. */
  102.  
  103. /*=============================*/
  104. /*@dependent@*/ /*@relnull@*/
  105.     rpmte te;
  106.  
  107.     HGE_t hge;            /*!< Vector to headerGetEntry() */
  108.     HAE_t hae;            /*!< Vector to headerAddEntry() */
  109.     HME_t hme;            /*!< Vector to headerModifyEntry() */
  110.     HRE_t hre;            /*!< Vector to headerRemoveEntry() */
  111.     HFD_t hfd;            /*!< Vector to headerFreeData() */
  112. /*-----------------------------*/
  113.     uid_t uid;            /*!< File uid (default). */
  114.     gid_t gid;            /*!< File gid (default). */
  115.     uint_32 flags;        /*!< File flags (default). */
  116.     fileAction action;        /*!< File disposition (default). */
  117. /*@owned@*/ /*@relnull@*/
  118.     fileAction * actions;    /*!< File disposition(s). */
  119. /*@owned@*/
  120.     struct fingerPrint_s * fps;    /*!< File fingerprint(s). */
  121. /*@owned@*/
  122.     const char ** obnl;        /*!< Original basename(s) (from header) */
  123. /*@owned@*/
  124.     const char ** odnl;        /*!< Original dirname(s) (from header) */
  125. /*@unused@*/
  126.     int_32 * odil;        /*!< Original dirindex(s) (from header) */
  127.  
  128. /*@only@*/ /*@relnull@*/
  129.     unsigned char * md5s;    /*!< File md5 sums in binary. */
  130.  
  131. /*@only@*/ /*@null@*/
  132.     const char * pretrans;
  133. /*@only@*/ /*@null@*/
  134.     const char * pretransprog;
  135. /*@only@*/ /*@null@*/
  136.     const char * posttrans;
  137. /*@only@*/ /*@null@*/
  138.     const char * posttransprog;
  139.  
  140. /*@only@*/ /*@null@*/
  141.     char * fn;            /*!< File name buffer. */
  142.     int fnlen;            /*!< FIle name buffer length. */
  143.  
  144.     int astriplen;
  145.     int striplen;
  146.     unsigned int archivePos;
  147.     unsigned int archiveSize;
  148.     mode_t dperms;        /*!< Directory perms (0755) if not mapped. */
  149.     mode_t fperms;        /*!< File perms (0644) if not mapped. */
  150. /*@only@*/ /*@null@*/
  151.     const char ** apath;
  152.     int mapflags;
  153. /*@owned@*/ /*@null@*/
  154.     int * fmapflags;
  155. /*@owned@*/
  156.     FSM_t fsm;            /*!< File state machine data. */
  157.     int keep_header;        /*!< Keep header? */
  158.     uint_32 color;        /*!< Color bit(s) from file color union. */
  159. /*@owned@*/
  160.     sharedFileInfo replaced;    /*!< (TR_ADDED) */
  161. /*@owned@*/
  162.     uint_32 * replacedSizes;    /*!< (TR_ADDED) */
  163.     unsigned int record;    /*!< (TR_REMOVED) */
  164.     int magic;
  165. #define    RPMFIMAGIC    0x09697923
  166. /*=============================*/
  167.  
  168. /*@refs@*/ int nrefs;        /*!< Reference count. */
  169. };
  170.  
  171. #endif    /* _RPMFI_INTERNAL */
  172.  
  173. #ifdef __cplusplus
  174. extern "C" {
  175. #endif
  176.  
  177. /**
  178.  * Unreference a file info set instance.
  179.  * @param fi        file info set
  180.  * @param msg
  181.  * @return        NULL always
  182.  */
  183. /*@unused@*/ /*@null@*/
  184. rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
  185.         /*@null@*/ const char * msg)
  186.     /*@modifies fi @*/;
  187.  
  188. /** @todo Remove debugging entry from the ABI.
  189.  * @param fi        file info set
  190.  * @param msg
  191.  * @param fn
  192.  * @param ln
  193.  * @return        NULL always
  194.  */
  195. /*@-exportlocal@*/
  196. /*@null@*/
  197. rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
  198.         /*@null@*/ const char * msg, const char * fn, unsigned ln)
  199.     /*@modifies fi @*/;
  200. /*@=exportlocal@*/
  201. #define    rpmfiUnlink(_fi, _msg) XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)
  202.  
  203. /**
  204.  * Reference a file info set instance.
  205.  * @param fi        file info set
  206.  * @param msg
  207.  * @return        new file info set reference
  208.  */
  209. /*@unused@*/ /*@null@*/
  210. rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg)
  211.     /*@modifies fi @*/;
  212.  
  213. /** @todo Remove debugging entry from the ABI.
  214.  * @param fi        file info set
  215.  * @param msg
  216.  * @param fn
  217.  * @param ln
  218.  * @return        NULL always
  219.  */
  220. /*@null@*/
  221. rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg,
  222.         const char * fn, unsigned ln)
  223.         /*@modifies fi @*/;
  224. #define    rpmfiLink(_fi, _msg)    XrpmfiLink(_fi, _msg, __FILE__, __LINE__)
  225.  
  226. /**
  227.  * Return file count from file info set.
  228.  * @param fi        file info set
  229.  * @return        current file count
  230.  */
  231. int rpmfiFC(/*@null@*/ rpmfi fi)
  232.     /*@*/;
  233.  
  234. /**
  235.  * Return current file index from file info set.
  236.  * @param fi        file info set
  237.  * @return        current file index
  238.  */
  239. /*@unused@*/
  240. int rpmfiFX(/*@null@*/ rpmfi fi)
  241.     /*@*/;
  242.  
  243. /**
  244.  * Set current file index in file info set.
  245.  * @param fi        file info set
  246.  * @param fx        new file index
  247.  * @return        current file index
  248.  */
  249. /*@unused@*/
  250. int rpmfiSetFX(/*@null@*/ rpmfi fi, int fx)
  251.     /*@modifies fi @*/;
  252.  
  253. /**
  254.  * Return directory count from file info set.
  255.  * @param fi        file info set
  256.  * @return        current directory count
  257.  */
  258. int rpmfiDC(/*@null@*/ rpmfi fi)
  259.     /*@*/;
  260.  
  261. /**
  262.  * Return current directory index from file info set.
  263.  * @param fi        file info set
  264.  * @return        current directory index
  265.  */
  266. int rpmfiDX(/*@null@*/ rpmfi fi)
  267.     /*@*/;
  268.  
  269. /**
  270.  * Set current directory index in file info set.
  271.  * @param fi        file info set
  272.  * @param dx        new directory index
  273.  * @return        current directory index
  274.  */
  275. int rpmfiSetDX(/*@null@*/ rpmfi fi, int dx)
  276.     /*@modifies fi @*/;
  277.  
  278. /**
  279.  * Return current base name from file info set.
  280.  * @param fi        file info set
  281.  * @return        current base name, NULL on invalid
  282.  */
  283. /*@observer@*/ /*@null@*/
  284. extern const char * rpmfiBN(/*@null@*/ rpmfi fi)
  285.     /*@*/;
  286.  
  287. /**
  288.  * Return current directory name from file info set.
  289.  * @param fi        file info set
  290.  * @return        current directory, NULL on invalid
  291.  */
  292. /*@observer@*/ /*@null@*/
  293. extern const char * rpmfiDN(/*@null@*/ rpmfi fi)
  294.     /*@*/;
  295.  
  296. /**
  297.  * Return current file name from file info set.
  298.  * @param fi        file info set
  299.  * @return        current file name
  300.  */
  301. /*@observer@*/
  302. extern const char * rpmfiFN(/*@null@*/ rpmfi fi)
  303.     /*@modifies fi @*/;
  304.  
  305. /**
  306.  * Return current file flags from file info set.
  307.  * @param fi        file info set
  308.  * @return        current file flags, 0 on invalid
  309.  */
  310. int_32 rpmfiFFlags(/*@null@*/ rpmfi fi)
  311.     /*@*/;
  312.  
  313. /**
  314.  * Return current file verify flags from file info set.
  315.  * @param fi        file info set
  316.  * @return        current file verify flags, 0 on invalid
  317.  */
  318. int_32 rpmfiVFlags(/*@null@*/ rpmfi fi)
  319.     /*@*/;
  320.  
  321. /**
  322.  * Return current file mode from file info set.
  323.  * @param fi        file info set
  324.  * @return        current file mode, 0 on invalid
  325.  */
  326. int_16 rpmfiFMode(/*@null@*/ rpmfi fi)
  327.     /*@*/;
  328.  
  329. /**
  330.  * Return current file state from file info set.
  331.  * @param fi        file info set
  332.  * @return        current file state, 0 on invalid
  333.  */
  334. rpmfileState rpmfiFState(/*@null@*/ rpmfi fi)
  335.     /*@*/;
  336.  
  337. /**
  338.  * Return current file (binary) md5 digest from file info set.
  339.  * @param fi        file info set
  340.  * @return        current file md5 digest, NULL on invalid
  341.  */
  342. /*@observer@*/ /*@null@*/
  343. extern const unsigned char * rpmfiMD5(/*@null@*/ rpmfi fi)
  344.     /*@*/;
  345.  
  346. /**
  347.  * Return current file linkto (i.e. symlink(2) target) from file info set.
  348.  * @param fi        file info set
  349.  * @return        current file linkto, NULL on invalid
  350.  */
  351. /*@observer@*/ /*@null@*/
  352. extern const char * rpmfiFLink(/*@null@*/ rpmfi fi)
  353.     /*@*/;
  354.  
  355. /**
  356.  * Return current file size from file info set.
  357.  * @param fi        file info set
  358.  * @return        current file size, 0 on invalid
  359.  */
  360. int_32 rpmfiFSize(/*@null@*/ rpmfi fi)
  361.     /*@*/;
  362.  
  363. /**
  364.  * Return current file rdev from file info set.
  365.  * @param fi        file info set
  366.  * @return        current file rdev, 0 on invalid
  367.  */
  368. int_16 rpmfiFRdev(/*@null@*/ rpmfi fi)
  369.     /*@*/;
  370.  
  371. /**
  372.  * Return current file inode from file info set.
  373.  * @param fi        file info set
  374.  * @return        current file inode, 0 on invalid
  375.  */
  376. int_32 rpmfiFInode(/*@null@*/ rpmfi fi)
  377.     /*@*/;
  378.  
  379. /**
  380.  * Return union of all file color bits from file info set.
  381.  * @param fi        file info set
  382.  * @return        current color
  383.  */
  384. uint_32 rpmfiColor(/*@null@*/ rpmfi fi)
  385.     /*@*/;
  386.  
  387. /**
  388.  * Return current file color bits from file info set.
  389.  * @param fi        file info set
  390.  * @return        current file color
  391.  */
  392. uint_32 rpmfiFColor(/*@null@*/ rpmfi fi)
  393.     /*@*/;
  394.  
  395. /**
  396.  * Return current file class from file info set.
  397.  * @param fi        file info set
  398.  * @return        current file class, 0 on invalid
  399.  */
  400. /*@-exportlocal@*/
  401. /*@observer@*/ /*@null@*/
  402. extern const char * rpmfiFClass(/*@null@*/ rpmfi fi)
  403.     /*@*/;
  404. /*@=exportlocal@*/
  405.  
  406. /**
  407.  * Return current file security context from file info set.
  408.  * @param fi        file info set
  409.  * @return        current file context, 0 on invalid
  410.  */
  411. /*@-exportlocal@*/
  412. /*@observer@*/ /*@null@*/
  413. extern const char * rpmfiFContext(/*@null@*/ rpmfi fi)
  414.     /*@*/;
  415. /*@=exportlocal@*/
  416.  
  417. /**
  418.  * Return current file depends dictionary from file info set.
  419.  * @param fi        file info set
  420.  * @retval *fddictp    file depends dictionary array (or NULL)
  421.  * @return        no. of file depends entries, 0 on invalid
  422.  */
  423. int_32 rpmfiFDepends(/*@null@*/ rpmfi fi,
  424.         /*@out@*/ /*@null@*/ const int_32 ** fddictp)
  425.     /*@modifies *fddictp @*/;
  426.  
  427. /**
  428.  * Return (calculated) current file nlink count from file info set.
  429.  * @param fi        file info set
  430.  * @return        current file nlink count, 0 on invalid
  431.  */
  432. int_32 rpmfiFNlink(/*@null@*/ rpmfi fi)
  433.     /*@*/;
  434.  
  435. /**
  436.  * Return current file modify time from file info set.
  437.  * @param fi        file info set
  438.  * @return        current file modify time, 0 on invalid
  439.  */
  440. int_32 rpmfiFMtime(/*@null@*/ rpmfi fi)
  441.     /*@*/;
  442.  
  443. /**
  444.  * Return current file owner from file info set.
  445.  * @param fi        file info set
  446.  * @return        current file owner, NULL on invalid
  447.  */
  448. /*@observer@*/ /*@null@*/
  449. extern const char * rpmfiFUser(/*@null@*/ rpmfi fi)
  450.     /*@*/;
  451.  
  452. /**
  453.  * Return current file group from file info set.
  454.  * @param fi        file info set
  455.  * @return        current file group, NULL on invalid
  456.  */
  457. /*@observer@*/ /*@null@*/
  458. extern const char * rpmfiFGroup(/*@null@*/ rpmfi fi)
  459.     /*@*/;
  460.  
  461. /**
  462.  * Return next file iterator index.
  463.  * @param fi        file info set
  464.  * @return        file iterator index, -1 on termination
  465.  */
  466. int rpmfiNext(/*@null@*/ rpmfi fi)
  467.     /*@modifies fi @*/;
  468.  
  469. /**
  470.  * Initialize file iterator index.
  471.  * @param fi        file info set
  472.  * @param fx        file iterator index
  473.  * @return        file info set
  474.  */
  475. /*@null@*/
  476. rpmfi rpmfiInit(/*@null@*/ rpmfi fi, int fx)
  477.     /*@modifies fi @*/;
  478.  
  479. /**
  480.  * Return next directory iterator index.
  481.  * @param fi        file info set
  482.  * @return        directory iterator index, -1 on termination
  483.  */
  484. /*@unused@*/
  485. int rpmfiNextD(/*@null@*/ rpmfi fi)
  486.     /*@modifies fi @*/;
  487.  
  488. /**
  489.  * Initialize directory iterator index.
  490.  * @param fi        file info set
  491.  * @param dx        directory iterator index
  492.  * @return        file info set, NULL if dx is out of range
  493.  */
  494. /*@unused@*/ /*@null@*/
  495. rpmfi rpmfiInitD(/*@null@*/ rpmfi fi, int dx)
  496.     /*@modifies fi @*/;
  497.  
  498. /**
  499.  * Destroy a file info set.
  500.  * @param fi        file info set
  501.  * @return        NULL always
  502.  */
  503. /*@null@*/
  504. rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi)
  505.     /*@globals fileSystem @*/
  506.     /*@modifies fi, fileSystem @*/;
  507.  
  508. /**
  509.  * Create and load a file info set.
  510.  * @deprecated Only scareMem = 0 will be permitted.
  511.  * @param ts        transaction set (NULL skips path relocation)
  512.  * @param h        header
  513.  * @param tagN        RPMTAG_BASENAMES
  514.  * @param scareMem    Use pointers to refcounted header memory?
  515.  * @return        new file info set
  516.  */
  517. /*@null@*/
  518. rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem)
  519.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  520.     /*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
  521.  
  522. /**
  523.  * Retrieve file classes from header.
  524.  *
  525.  * This function is used to retrieve file classes from the header.
  526.  * 
  527.  * @param h        header
  528.  * @retval *fclassp    array of file classes
  529.  * @retval *fcp        number of files
  530.  */
  531. void rpmfiBuildFClasses(Header h,
  532.         /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
  533.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  534.     /*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
  535.  
  536. /**
  537.  * Retrieve file security contexts from header.
  538.  *
  539.  * This function is used to retrieve file contexts from the header.
  540.  * 
  541.  * @param h        header
  542.  * @retval *fcontextp    array of file contexts
  543.  * @retval *fcp        number of files
  544.  */
  545. void rpmfiBuildFContexts(Header h,
  546.         /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
  547.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  548.     /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
  549.  
  550. /**
  551.  * Retrieve file security contexts from file system.
  552.  *
  553.  * This function is used to retrieve file contexts from the file system.
  554.  * 
  555.  * @param h        header
  556.  * @retval *fcontextp    array of file contexts
  557.  * @retval *fcp        number of files
  558.  */
  559. void rpmfiBuildFSContexts(Header h,
  560.         /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
  561.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  562.     /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
  563.  
  564. /**
  565.  * Retrieve file security contexts from policy RE's.
  566.  *
  567.  * This function is used to retrieve file contexts from policy RE's.
  568.  * 
  569.  * @param h        header
  570.  * @retval *fcontextp    array of file contexts
  571.  * @retval *fcp        number of files
  572.  */
  573. void rpmfiBuildREContexts(Header h,
  574.         /*@out@*/ const char *** fcontextp, /*@out@*/ int * fcp)
  575.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
  576.     /*@modifies h, *fcontextp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
  577.  
  578. /**
  579.  * Retrieve per-file dependencies from header.
  580.  *
  581.  * This function is used to retrieve per-file dependencies from the header.
  582.  * 
  583.  * @param h        header
  584.  * @param tagN        RPMTAG_PROVIDENAME | RPMTAG_REQUIRENAME
  585.  * @retval *fdepsp    array of file dependencies
  586.  * @retval *fcp        number of files
  587.  */
  588. void rpmfiBuildFDeps(Header h, rpmTag tagN,
  589.         /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
  590.     /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
  591.     /*@modifies h, *fdepsp, *fcp,
  592.         rpmGlobalMacroContext, fileSystem, internalState @*/;
  593.  
  594. /**
  595.  * Return file type from mode_t.
  596.  * @param mode        file mode bits (from header)
  597.  * @return        file type
  598.  */
  599. fileTypes whatis(uint_16 mode)
  600.     /*@*/;
  601.  
  602. /**
  603.  * Return file info comparison.
  604.  * @param afi        1st file info
  605.  * @param bfi        2nd file info
  606.  * @return        0 if identical
  607.  */
  608. int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
  609.     /*@*/;
  610.  
  611. /**
  612.  * Return file disposition.
  613.  * @param ofi        old file info
  614.  * @param nfi        new file info
  615.  * @param skipMissing    OK to skip missing files?
  616.  * @return        file dispostion
  617.  */
  618. fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
  619.     /*@globals h_errno, fileSystem, internalState @*/
  620.     /*@modifies nfi, fileSystem, internalState @*/;
  621.  
  622. /**
  623.  * Return whether file is conflicting config
  624.  * @param fi        file info
  625.  * @return        1 if config file and file on disk conflicts
  626.  */
  627. int rpmfiConfigConflict(const rpmfi fi)
  628.     /*@*/;
  629.  
  630. /**
  631.  * Return formatted string representation of package disposition.
  632.  * @param fi        file info set
  633.  * @return        formatted string
  634.  */
  635. /*@-redef@*/
  636. /*@observer@*/
  637. const char *const rpmfiTypeString(rpmfi fi)
  638.     /*@*/;
  639. /*@=redef@*/
  640.  
  641. #ifdef __cplusplus
  642. }
  643. #endif
  644.  
  645. #endif    /* H_RPMDS */
  646.